import 'package:flutter/material.dart';

//Flutter 输入框
void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Container(
          color: Colors.grey[200],

          padding: EdgeInsets.only(top: 10, bottom: 10),
          child: Row(
            children: [
              SizedBox(width: 20),
              //图片
              Image.asset(
                'asset/images/user_info.png',
                fit: BoxFit.fill,
                width: 66,
                height: 66,
              ),
              SizedBox(width: 20),
              //用户基本信息
              Expanded(
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisSize: MainAxisSize.min,
                  children: [
                    Text(
                      '早起的年轻人',
                      style: TextStyle(
                        fontSize: 20,
                        fontWeight: FontWeight.w700,
                      ),
                    ),
                    SizedBox(height: 12),
                    Text('微信号：32343434543534'),
                  ],
                ),
              ),

              //操作符
              Column(
                mainAxisSize: MainAxisSize.min,
                children: [
                  Icon(Icons.qr_code),
                  SizedBox(height: 12),
                  Icon(Icons.arrow_forward_ios, size: 14),
                ],
              ),

              //占位
              SizedBox(width: 12),
            ],
          ),
        ),
      ),
    );
  }
}
